import os

max_x = 5
max_y = 5

for x in range(max_x):
    for y in range(max_y):
        if x >= y:
            # command = "flatpak run org.openscad.OpenSCAD -o ./out/"+character+".stl -D \"stamp(\\\"\\\\U"+format(ord(character), '06x')+"\\\");\" ./v1.scad&"
            #command = "flatpak run org.openscad.OpenSCAD -o ./out/"+character+".stl -D \"stamp(\\\""+character+"\\\");\" ./v1.scad&"
            command_bottom = "\'/home/ontake/Apps/OpenSCAD-2024.05.20.ai19442-x86_64.AppImage\' -o ./out/"+str(x+1)+"x"+str(y+1)+"-bottom.stl -D gridx=\'"+str(x+1)+"\' -D gridy=\'"+str(y+1)+"\' -D shitfinity_top=\'false\' ./v1.scad &"
            print(command_bottom)
            os.system(command_bottom)
            command_top = "\'/home/ontake/Apps/OpenSCAD-2024.05.20.ai19442-x86_64.AppImage\' -o ./out/"+str(x+1)+"x"+str(y+1)+"-top.stl -D gridx=\'"+str(x+1)+"\' -D gridy=\'"+str(y+1)+"\' -D shitfinity_top=\'true\' ./v1.scad &"
            print(command_top)
            os.system(command_top)
